/**
 *Copyright (c) [Year] [name of copyright holder]
 * [Software Name] is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.workflow.api.activiti;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import com.koron.util.Constant;
import com.koron.util.encode.RSAEncrypt;

public class T {
	
	public static void main(String[] args) {
		System.out.println(4&14);
		List<String> assignees = new ArrayList<String>() {
			{
				add("1111");
				add("2222");
				add("3333");
				add("4444");
				add("5555");
				add("6666");
			}
		};
		List<String> userList = new ArrayList<String>() {
			{
				add("1111");
				add("3333");
			}
		};
		
		
		System.out.println(encrypt("css2" + "-" + System.currentTimeMillis()));
	}

	public static String encrypt(String text) {
		try {
			Objects.requireNonNull(text, "要加密的内容不能为空");
			return RSAEncrypt.encrypt(RSAEncrypt.loadPublicKeyByStr(Constant.RSApublickey), text.getBytes("UTF-8"));
		} catch (Exception e) {
			throw new RuntimeException("加密失败");
		}
	}
}
